<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<link rel="stylesheet" type="text/css" href="template/default/content/css/style.css">
<script language="javascript" type="text/javascript" src="DatePicker/WdatePicker.js"></script>
<script src="template/default/tree/js/admincp.js?SES" type="text/javascript"></script>
<script charset="utf-8" src="eweb/kindeditor.js"></script>
<script type="text/javascript"> 
function show_help()
{
   mytop=(screen.availHeight-430)/2;
   myleft=(screen.availWidth-800)/2;
   window.open("admin.php?ac=view&fileurl=help&helpid=<?=$fileurl?>","","height=470,width=800,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top="+mytop+",left="+myleft+",resizable=yes");
}
</script>
<title>Office 515158 2011 OA办公系统</title>
 
</head>
<body <?php if($blog['tempkey']=='3'){?>onLoad="toggle2('div1');"<?php }?>>
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="0" class="small">
  <tr>
    <td class="Big"><img src="template/default/content/images/notify_new.gif" align="absmiddle"><span class="big3"> 工作流模板编辑</span>&nbsp;&nbsp;&nbsp;&nbsp;
	<span style="font-size:12px;"><a href="#" onClick="show_help()" style="font-size:12px;">使用帮助文档？</a>&nbsp;|&nbsp;
	<a href="http://bbs.515158.com/" target="_blank" style="font-size:12px;">使用遇到问题？</a>&nbsp;|&nbsp;
	<a href="admin.php?ac=template&fileurl=<?=$fileurl?>" style="font-size:12px;">返回列表页</a><img src="template/default/content/images/f_ico.png" align="absmiddle"></span>
    </td>
  </tr>
</table>
<script Language="JavaScript"> 
function CheckForm()
{
   if(document.save.workclasstype.value=="")
   { alert("工作流类别不能为空！");
     document.save.workclasstype.focus();
     return (false);
   }
   if(document.save.title.value=="")
   { alert("模板名称不能为空！");
     document.save.title.focus();
     return (false);
   }
   if(document.save.workmonitor.value=="")
   { alert("监控人员不能为空！");
     document.save.workmonitor.focus();
     return (false);
   }
   return true;
}
function sendForm()
{
   if(CheckForm())
      document.save.submit();
}
function toggle(targetid){
     if (document.getElementById){
         target=document.getElementById(targetid);
             if (target.style.display=="block"){
                 target.style.display="none";
             } else {
                 target.style.display="none";
             }
     }
}
function toggle2(targetid){
     if (document.getElementById){
         target=document.getElementById(targetid);
             if (target.style.display=="none"){
                 target.style.display="block";
             } else {
                 target.style.display="block";
             }
     }
}

</script>
<style type="text/css"> 
#div1{display:none;}
#div2{display:block;}
</style>

<form name="save" method="post" action="?ac=template&do=editsave&fileurl=work">
	<input type="hidden" name="savetype" value="edit" />
	<input type="hidden" name="id" value="<?=$blog['id']?>" />
<table class="TableBlock" border="0" width="90%" align="center">
 
   
	<tr>
      <td nowrap class="TableContent" width="15%"> 工作流类别：<? get_user_add_help()?></td>
      <td class="TableData">
      <select name="workclasstype">
			
			<?=get_work_type_options($blog['workclasstype'])?>
			</select> </td>
    </tr>
	<tr>
      <td nowrap class="TableContent" width="15%"> 模板名称：<? get_user_add_help()?></td>
      <td class="TableData">
      <input type="text" name="title" class="BigInput" style="width:268px;" size="20" value="<?=$blog['title']?>" /></td>
    </tr>
	
<?php
if($blog['temptype']!='1'){
?>
	<tr>
      <td nowrap class="TableContent" width="15%"> 流程类型：<? get_user_add_help()?></td>
      <td class="TableData">
	  <input name="tmpytpe" type="radio" value="1" <?php if($blog['tmpytpe']=='1'){?>checked="checked"<?php }?>  />自由流程
      <input name="tmpytpe" type="radio" value="2" <?php if($blog['tmpytpe']=='2'){?>checked="checked"<?php }?> />固定流程
	  </td>
    </tr>
	<tr>
      <td nowrap class="TableContent" width="15%"> 状态：<? get_user_add_help()?></td>
      <td class="TableData">
	  <input name="tempkey" type="radio" value="1" <?php if($blog['tempkey']=='1'){?>checked="checked"<?php }?>  onclick="toggle('div1')" />正常
      <input name="tempkey" type="radio" value="2" onclick="toggle('div1')" <?php if($blog['tempkey']=='2'){?>checked="checked"<?php }?> />停用
	  <input name="tempkey" type="radio" value="3" onclick="toggle2('div1')" <?php if($blog['tempkey']=='3'){?>checked="checked"<?php }?> />模板集成
	  </td>
    </tr>
	<tr id="div1">
      <td nowrap class="TableContent" width="15%"> 模板文件名称：</td>
      <td class="TableData">
      <input type="text" name="tmpaddr" class="BigInput" style="width:200px;" size="20" value="<?=$blog['tmpaddr']?>" /></td>
    </tr>
<? }else{?>
<input type="hidden" name="tmpytpe" value="<?=$blog['tmpytpe']?>" />
<input type="hidden" name="tempkey" value="<?=$blog['tempkey']?>" />
<input type="hidden" name="tmpaddr" value="<?=$blog['tmpaddr']?>" />	
<? }?>
	<tr>
      <td nowrap class="TableContent" width="15%"> 使用人员：</td>
      <td class="TableData">
      <?php
	  get_oa_member_public(2,"workuse",$blog['workuse'],"+选择使用人员",50,4)
	  ?><br>注：是指允许使用此模块的人员，留空为全体人员使用
	  </td>
    </tr>
	<tr>
      <td nowrap class="TableContent" width="15%"> 监控人员：<? get_user_add_help()?></td>
      <td class="TableData">
      <?php
	  get_oa_member_public(2,"workmonitor",$blog['workmonitor'],"+选择监控人员",50,4)
	  ?><br>注：是指可以监控此模板下工作流程的用户
	  
	  </td>
    </tr>
	
    
    <tr align="center" class="TableControl">
      <td colspan="2" nowrap height="35">

		<input type="button" value="保存" class="BigButtonBHover" onClick="sendForm();">
        
      </td>
    </tr>
  </table>
</form>

 
</body>
</html>
